package com.hou.serviceuserfeign.feign.impl;

import com.hou.serviceuserfeign.feign.OrderFeignClient;
import com.hou.serviceuserfeign.po.Order;
import org.springframework.stereotype.Component;

/**
 * Feign中使用Fallback需要使用feing接口的实现类
 */
@Component
public class OrderFeignClientFallback implements OrderFeignClient {

    @Override
    public String getOrderName() {
        return "服务无效";
    }

    @Override
    public Order insertOrder(Order order) {
        return new Order("-1","服务挂了");
    }
}
